﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows;

namespace E_mail
{
    public class CSVParser
    {
        #region Wczytywanie pliku CSV
        public static List<String[]> LoadFile(string path)
        {
            var parsedData = new List<string[]>();
            try
            {
                using (var readFile = new StreamReader(path))
                {
                    string line;
                    while ((line = readFile.ReadLine()) != null)
                    {
                        string[] row = line.Split(',');
                        parsedData.Add(row);
                    }
                }
            }catch (Exception)
            {
                //MessageBox.Show(ex.ToString());
            }
            return parsedData;
        }
        #endregion
        }
    }

